package org.linlinjava.litemall.wx;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
//import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.annotation.PostConstruct;
import java.time.LocalDateTime;
import java.util.TimeZone;
@SpringBootApplication(scanBasePackages = {"org.linlinjava.litemall"})
@MapperScan("org.linlinjava.litemall.db.dao")
@EnableTransactionManagement
@EnableScheduling
public class LitemallWXApplication {

    @Value("${sys.datetime}")
    public String SysDateTime;

    @Value("${sys.timezone}")
    public String SysTimezone;

    @Value("${sys.localtime}")
    public String Syslocaltime;

    @PostConstruct
    public void init() {
        TimeZone.setDefault(TimeZone.getTimeZone(SysDateTime));
        System.err.println(SysTimezone+" ："+SysDateTime);
        System.err.println(Syslocaltime+" ："+ LocalDateTime.now());
    }

    public static void main(String[] args) {
        SpringApplication.run(LitemallWXApplication.class, args);
    }
}
